<template>
    <div class="page-box">
        <span v-if="totalCount > 10">共{{ totalCount }}条</span>
        <el-pagination layout="prev, pager, next" @current-change="changeCurrentPage" :total="totalCount"></el-pagination>
    </div>
</template>

<script setup>
let props = defineProps({
    totalCount: {
        type: Number,
        default: 0
    },
    getPage: {
        type: Function
    }
})

function changeCurrentPage(currPage) {
    props.getPage(currPage)
}
</script>

<style lang="scss">
.page-box {
    margin-top: 15px;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    font-size: 0.8em;
}

.page-box .el-pagination {
    justify-content: flex-end;
}
</style>